package com.oktest.measure.xml

import android.content.Context
import android.util.Log
import java.io.File
import java.io.FileWriter

/**
 * @Author hhh
 * @Date 2020/9/20
 */

const val TASKS = "tasks"
const val TASK = "task"
const val METERAGE = "meterage"
const val MEASURE = "measure"

fun Context.writerToFile(content:String) {
    val filePath = "${this.filesDir}${File.separator}${System.currentTimeMillis()}.json"
    val fileWriter = FileWriter(filePath)
    fileWriter.write(content)
    fileWriter.close()
}

fun String.log(msg: String) {
    Log.i("task -> $this", msg)
}